export async function fetchDataBeforeLogin(url: string, data: any) {
    const response = await fetch(url, {
        method: "POST",
        headers: {
            "Host": "pocketapi.48.cn",
            "Content-Type": "application/json;charset=utf-8",
            "Content-Length": "153",
            "Accept": "*/*",
            "Accept-Encoding": "gzip, deflate, br",
            "Connection": "keep-alive",
            "pa": "MTY5MjY1MzQwODAwMCwyNDExLDIwNzc2MUQxM0E2NjE1MjFCNkE0NkM4QTY4NTVCNjM3LA==",
            "User-Agent": "PocketFans201807/7.1.0 (iPad; iOS 16.6; Scale/2.00)",
            "Accept-Language": "zh-Hans-CN;q=1, zh-Hant-TW;q=0.9",
            "appInfo": JSON.stringify({
                "vendor": "Huawei",
                "deviceId": "F2BA149C-06DB-9843-31DE-36BF375E36F2",
                "appVersion": "7.1.0",
                "appBuild": "23051902",
                "osVersion": "16.6.0",
                "osType": "ios",
                "deviceName": "Huawei",
                "os": "ios"
            })
        },
        body: JSON.stringify(data)
    });

    return await response.json();
}
